package com.b511.swpu.cementbackend.dto.output;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.Set;

@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(exclude = {"child"})
public class SysMenuTreeOutputDto implements Comparable<SysMenuTreeOutputDto> {

    private String name;

    private String index;

    private String icon;

    private Set<SysMenuTreeOutputDto> child;

    @Override
    public int compareTo(SysMenuTreeOutputDto o) {
        return index.compareTo(o.getIndex());
    }
}
